#ifndef _CALCULATE_H
#define _CALCULATE_H

#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include <unistd.h>
#include <math.h>
#include "SPI_ADC.h"
#include "sensor.h"

//extern float Calculate_Virtual(uint16_t *dat,float average,uint16_t len);
extern float Calculate_Virtual_OneData(float dat,float average);
extern void Calculate_Vpp_Max_Min_Avg_OneData(float dat,float *max,float_t *min,float_t *vpp,float_t *avg);
extern float_t Calculate_SumVirtual(float SumSquares,uint32_t len);
extern float_t Calculate_Avg_OneData(float SUM, uint32_t len);
extern void Calculate_Eigenvalue(uint16_t *data,uint16_t *Vdata,uint16_t *Sdata,vibrateConstant_t *Virtul,Smsgs_vibrateChannelConfig_t st_channelconfg,uint16_t len);

#endif
